<!DOCTYPE html>
<html lang="en">
<include file="Public/header" title="活动管理" keywords="社团管理系统，常州大学，课程设计" />

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox-content">

                <table class="table table-striped table-bordered table-hover dataTables-example" id="newactivity">
                    <thead>
                    <tr>
                        <td>系部编号</td>
                        <td>系部名称</td>
                        <td>系部人数</td>
                        <td>操作</td>
                    </tr>
                    </thead>
                    <tbody>
                    <foreach name="res" item="val" key="k">
                        <tr>
                            <td>{$val.spenum}</td>
                            <td>{$val.spename}</td>
                            <td>{$val.spesize}</td>
                            <td data-id="{$val.id}" data-did="{$val.id}">
	                            
	                            <a href="{:U('Statistical/showclass',array('id'=>$val['spenum']))}">
	                            <button class="btn btn-sm btn-info " title="agreebtn">查看</button></a>
	                            <a href="{:U('Excel/speExcel',array('spename'=>$val['spename']))}">
                                    		<button type="submit" class="btn btn-sm btn-info">导出</button></a>
	                            <button class="btn btn-sm btn-danger delspe" title="disagreebtn">删除</button>
	                            
                            </td>
                        </tr>
                    </foreach>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
</div>
</body>

<script src="__PUBLIC__/js/jquery.min.js?v=2.1.4"></script>
<script src="__PUBLIC__/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__PUBLIC__/js/plugins/jeditable/jquery.jeditable.js"></script>
<script src="__PUBLIC__/js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="__PUBLIC__/js/plugins/dataTables/dataTables.bootstrap.js"></script>
<script src="__PUBLIC__/js/content.min.js?v=1.0.0"></script>
<script>
    $(document).ready(function(){$(".dataTables-example").dataTable();var oTable=$("#editable").dataTable();oTable.$("td").editable("http://www.zi-han.net/theme/example_ajax.php",{"callback":function(sValue,y){var aPos=oTable.fnGetPosition(this);oTable.fnUpdate(sValue,aPos[0],aPos[1])},"submitdata":function(value,settings){return{"row_id":this.parentNode.getAttribute("id"),"column":oTable.fnGetPosition(this)[2]}},"width":"90%","height":"100%"})});function fnClickAddRow(){$("#editable").dataTable().fnAddData(["Custom row","New row","New row","New row","New row"])};
</script>
<script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
<script>
$(".a-upload").on("change", "input[type='file']", function () {
    var filePath = $(this).val();
    $(".fileerrorTip").html("").hide();
    var arr = filePath.split('\\');
    var fileName = arr[arr.length - 1];
    $(".showFileName").html(fileName);
});

    $('.delspe').on('click',function () {
        var btn = $(this);
        var id = btn.parent().data('id');
        var param = {id: id};
        var url = "{:U('Superadmin/delspe')}";
        $.ajax({
            url: url,
            data: param,
            dataType: 'json',
            type: 'post',
            success: function (data) {
                var dotr = btn.closest('tr');
                alert(data.info);
                if (data.status == 1) {
                    dotr.remove();
                }
            },
            error: function () {
                alert('操作失败');
            }
        })
    })
    
    $('.gradeX').click(function (){
    	$('#tanchuan').css('display', 'block');
    })
    $('body').dblclick(function () {
    	$('#tanchuan').css('display', 'none');
    })
</script>
</html>